The Exchanging Copies rule is one of two multi-directional rules offered by SureSync. This rule will copy additions and changes that occur on any path in the synchronization to the other defined paths. An Exchanging Copies rule does not synchronize deletions. If a user deletes a file from one of the paths, the file will be added back from the other side. To delete a file, you need to delete it from all sides of the synchronization before running the job again.
The difference between a Multi-Mirror rule and an Exchanging Copies rule is simple. With a Multi-Mirror, deletes are propagated. With an Exchange Copies rule, deletes are not allowed. If a file is deleted from one side, it will be copied back from another one of the paths.
Multi-directional rules have a special situation which must be considered called a multiple update. If two users change the same file on multiple paths before SureSync can perform a synchronization, a conflict is created. The likelihood of such a conflict occurring depends on how frequently the synchronization job is run. For example, a Schedule run once a day has a much higher likelihood of encountering this problem than a Real-Time Monitor which is constantly synchronizing changes.
How does SureSync handle a multiple update situation? Three options are available. The default behavior is to log an error and suppress the synchronization. This allows the administrator to select a version to keep or merge the changed files together. A second option will select the file with the most recent time and date stamp. This file "wins" and is synchronized over all other copies. Finally, SureSync offers the SPIAgent File Locking Add-on which eliminates this problem entirely. When a user opens a file on one path, the file is locked on all other paths. This means only one user can change a particular file at once.
Please note:
If it is the first time the synchronization has been performed, SureSync will not have a history to compare to. Therefore, the first time a synchronization is performed, for any differing files SureSync will take a file from the root with the most recent version of that file and copy it over to the other root. You may wish to use the Preview mode to verify that the actions it will perform during that first synchronization are what you want and to override the ones that aren't.
This method does not delete files. If you delete a file manually from a path, the next time the files are synchronized a new copy will replace the deleted version. If you want the ability to perpetuate deletes with the multi-way copying, you must choose Multi-Mirror as your method.
Possible Scenarios
The Multi-Mirror and Exchanging Copies rules are useful for the same purposes. The determining factor becomes if you want deletes propagated or not. With an Exchange Copies rule, there is no way to delete files unless you manually delete them from all paths.
Synchronize between a laptop and a desktop
A Exchanging Copies rule can be very helpful if you work between a laptop and a desktop. SureSync can be used with a Exchanging Copies to synchronize your document folders between the two machines. This ensures that you have the most recent version of all of your files on each machine, making it easy to work between multiple machines.
Synchronize web farms
A web farm consists of a number of different web servers that serve files for the same web site. If a server goes down, additional servers are available to serve the pages to the end user. SureSync with a Exchanging Copies rule can be used to ensure that all content from a web site is available on all machines in the web farm. For example, if a customer uploads a file to the web site, that uploaded file would be synchronized to all servers in the farm. A Real-Time Monitor is recommended for this type of scenario.
Collaborative file sharing
One of the most powerful solutions available through the use of a Exchanging Copies rule is collaborative file sharing. In this scenario, a copy of the file share is maintained in each office. The users in each office then access the files through their local file share. This eliminates the need for users to access files remotely over a slow WAN connection. In the background, SureSync synchronizes the changes that occur in each office to all the other offices. This ensures that the users in each office are always working off the most recent version of the files.
Summary Chart
The summary chart will give you a breakdown of how the Exchanging Copies rule functions when different events occur.
Event
Action Taken
If a file is added or changes on any path...
Add new files. Replace file on all other paths with a copy from source, if not yet identical.
If a file is deleted from any path...
The deleted file is recovered from another path. You must delete a file from all paths to prevent it from being recovered.
If a file changes on multiple paths... *
Issue warning and do not copy, unless the copy latest option was selected.
If a file is added to a path for the first time (SureSync has no history for the file)
Add new file.
If different versions of a file are added multiple paths (SureSync has no history for the file)
Issue warning and do not copy, unless the copy latest option was selected